package com.krlin.course.service.impl;

import com.krlin.course.dao.CourseDao;
import com.krlin.course.entity.Course;
import com.krlin.course.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseServiceImpl implements CourseService {

    @Autowired
    CourseDao courseDao;

    @Override
    public List<String> getCollegeList() {
        return courseDao.getCollegeList();
    }

    @Override
    public List<String> getTeacherInfoList(String college) {
        return courseDao.getTeacherInfoList(college);
    }

    @Override
    public List<Course> getClassInfoList(String teacherName) {
        return courseDao.selectByTeacherInfo(teacherName);
    }

    @Override
    public int save(Course course) {
        return courseDao.updateByPrimaryKeySelective(course);
    }
}
